Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(Warehouse): add buttons only if the user can use them #42232

Merged
merged 1 commit into from
Jul 10, 2024

Conversation

barredterra
Copy link
Collaborator

@barredterra barredterra commented Jul 8, 2024

Avoid adding buttons that will throw a permission error when the user clicks on them.

Before

frm.add_custom_button()

After

if (has_required_perm()) {
    frm.add_custom_button()
}

@barredterra barredterra merged commit 2254918 into frappe:develop Jul 10, 2024
18 checks passed
@barredterra barredterra deleted the warehouse-buttons branch July 10, 2024 11:14
barredterra added a commit that referenced this pull request Jul 10, 2024
…-42232

fix(Warehouse): add buttons only if the user can use them (backport #42232)
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 25, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants